<?php
namespace App\BaseExt\OSS;


class Upload
{
    public function doUpload($filePath,$name,$dir)
    {

        $bucket = OssCommon::getBucketName();
        $ossClient = OssCommon::getOssClient();

        $result = $ossClient->uploadFile($bucket, "$dir/".$name, "".$filePath);
//        OssCommon::println("c.file is created");
//        OssCommon::println("b.file is created");
//        OssCommon::println($result['x-oss-request-id']);
//        OssCommon::println($result['etag']);
//        OssCommon::println($result['content-md5']);
//        OssCommon::println($result['body']);
    }
}
